import http from '@/api/request';

// 百问百答分类
export const getDialogCategory = () => {
  return http.request({
    method: 'GET',
    url: '/app/dialog/category_list',
    params: { status: 1 },
  });
};

// 百问百答内容
export const getDialog = (page: number, limit: number, categoryId: number, title: string) => {
  return http.request({
    method: 'GET',
    url: '/app/dialog/list',
    params: {
      page_size: limit,
      page: page,
      dialog_category_id: categoryId,
      title: title,
      status: 1,
    },
  });
};

// 百问百答详情
export const getDialogDetail = (id: number) => {
  return http.request({
    method: 'GET',
    url: '/app/dialog/detail',
    params: { id: id },
  });
};
